﻿// <copyright file="HotkeyPressedEventArgs.cs" company="DotNetLib">
//
// .netlib: http://www.codeplex.com/DotNetLib
//
// Portions of this were part of the CodePlex "Extensions for .NET Framework"
//    project and written by Marco Minerva, mailto:marco.minerva@gmail.com
//
// This code is released under the New BSD License.
// A copy of this license is available at:
// http://www.codeplex.com/DotNetLib/license
//
// </copyright>

namespace DotNetLib.Windows
{
  using System;
  using System.Windows.Forms;

  /// <summary>
  /// Event arguments for when a hot key is pressed.
  /// </summary>
  public class HotkeyPressedEventArgs : EventArgs
  {
    /// <summary>
    /// Stores the key that was pressed.
    /// </summary>
    private Keys key;

    /// <summary>
    /// Gets any modifiers applied to the key pressed.
    /// </summary>
    private Modifiers modifier;

    /// <summary>
    /// Initializes a new instance of the <see cref="HotkeyPressedEventArgs"/> class.
    /// </summary>
    /// <param name="key">The key of the hot-key.</param>
    /// <param name="modifier">The access modifier of the hot-key.</param>
    public HotkeyPressedEventArgs(Keys key, Modifiers modifier)
    {
      this.key = key;
      this.modifier = modifier;
    }

    /// <summary>
    /// Gets the key of the hot-key.
    /// </summary>
    /// <value>The key of the hot-key.</value>
    public Keys Key
    {
      get { return this.key; }
    }

    /// <summary>
    /// Gets the access modifier of the hot-ket.
    /// </summary>
    /// <value>The access modifier of the hot-key.</value>
    public Modifiers Modifier
    {
      get { return this.modifier; }
    }
  }
}
